package view;

public class MainViewController implements LoginInterface{
	private MainView mainView;
	
	 private LoginPanel loginPanel;
	private view.ButtonsPanel buttonsPanel1;
    private view.VipManagePanel vipManagePanel1;
    
	public MainViewController(MainView mv){
		mainView = mv;
		loginPanel = new LoginPanel(this);
		buttonsPanel1 = new view.ButtonsPanel();
        vipManagePanel1 = new view.VipManagePanel();
		
	}
	public void showLoginView(){
		mainView.getContentPane().add(loginPanel);
//		showMainView();
	}
	public void showMainView(){
//		mainView.getContentPane().add(loginPanel);
//		mainView.getContentPane().remove(loginPanel);
		mainView.getContentPane().removeAll();
//		mainView.getContentPane().setLayout(new java.awt.FlowLayout());
		mainView.setSize(1100, 700);
		
		mainView.getContentPane().add(buttonsPanel1);
		mainView.getContentPane().add(vipManagePanel1);
//		System.out.println("showMainView");
		mainView.getContentPane().validate();
		mainView.repaint();
	}

}
